package com.dto.cnc;


import java.util.SortedMap;
import java.util.TreeMap;

/*机床报警信息信息持久类*/
public class AlarmDTO {
    /*机床通知信息*/
    private static String message = "0";/*报警信息*/
    private static String  st= "0";/* st 发生错误的 station*/
    private static String  no= "0";/*no 错误号码*/
    private static String  prio= "0";/*prio 严重级别*/
    private static String  localtime= "0000-00-00-00:00:00";/*本地时间*/

    /*JSON格式*/
    private static SortedMap sortedMap; ;

    public static SortedMap getSortedMap() {

        /*"localtime":"04/11/22-15:13:09","msg":"请清理主轴锥面及刀柄-检查是否磨损!","level":"0","num":"40290"}*/
        if (sortedMap==null){
            SortedMap<String,String> map = new TreeMap<String,String>() ;   //通过子类实例化接口对象
            map.put("localtime","00/00/00-00:00:00") ;
            map.put("msg","") ;
            map.put("level","") ;
            map.put("num","") ;
           return map;
        } else {
            return sortedMap;
        }
        /*{"localtime":"00/00/00-00:00:00","msg":"","level":"","num":""}*/
    /*{"localtime":"04/11/22-15:36:09","msg":"自动程序-正在执行请求-设置自动程序名-不允许执行","level":"0","num":"81"}*/
    }

    public static void setSortedMap(SortedMap sortedMap) {
        AlarmDTO.sortedMap = sortedMap;
    }

    public static String getLocaltime() {
        return localtime;
    }

    public static void setLocaltime(String localtime) {
        AlarmDTO.localtime = localtime;
    }

    public static String getMessage() {
        return message;
    }

    public static void setMessage(String message) {
        AlarmDTO.message = message;
    }

    public static String getSt() {
        return st;
    }

    public static void setSt(String st) {
        AlarmDTO.st = st;
    }

    public static String getNo() {
        return no;
    }

    public static void setNo(String no) {
        AlarmDTO.no = no;
    }

    public static String getPrio() {
        return prio;
    }

    public static void setPrio(String prio) {
        AlarmDTO.prio = prio;
    }

}
